package com.ruoyi.project.management.delay.controller;

import com.ruoyi.project.management.delay.domain.Task;
import com.ruoyi.project.management.delay.service.ManagementTaskService;
import com.ruoyi.project.system.dept.domain.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("management/taskrw")
public class ManagementTaskController {

    @Autowired
    private ManagementTaskService managementTaskService;


    @PostMapping("/selectAll")
    @ResponseBody
    public List<Task> selectAll()
    {
        List<Task> list = managementTaskService.selectmore();
        return list;
    }

    @PostMapping("/selectAll2")
    @ResponseBody
    public List<Task> selectAll2()
    {
        List<Task> list = managementTaskService.selectmore2();
        return list;
    }

    /**
     * ajax更具公司id动态获取旗下部门
     */
    @PostMapping("/selectTaskAll")
    @ResponseBody
    public List<Task> selectDeptAll(Integer task_id)
    {
        System.out.println(task_id);
        List<Task> list = managementTaskService.selectById(task_id);
        return list;
    }



}
